package com.miguo.utils;

import android.app.Activity;
import android.content.Intent;
import android.support.v4.app.Fragment;

import com.miguo.ui.R;

/**
 * File Names: IntentUtils
 * Describe:
 * User: LinXiaoZhi(87100854@qq.com)
 * Date: 2015-08-08
 * Time: 02:55
 */

public class IntentUtils {

//    public static void finishActivityAnimToLeft(Activity activity) {
//        activity.finish();
//        activity.overridePendingTransition(R.anim.push_left_in, R.anim.left_out);
//    }
//
//    public static void finishActivityAnimToRight(Activity activity) {
//        activity.finish();
//        activity.overridePendingTransition(R.anim.hold, R.anim.right_out);
//    }
//
//    public static void finishActivityAnimZoomExit(Activity activity) {
//        activity.finish();
//        activity.overridePendingTransition(R.anim.hold, R.anim.zoom_exit);
//    }
//
//    public static void finishWebViewActivity(Activity activity) {
//        activity.finish();
//        activity.overridePendingTransition(R.anim.hold, R.anim.right_out);
//    }
//
//
//    public static void startActivityAnimFromLeft(Activity activity, Intent intent) {
//        activity.startActivity(intent);
//        activity.overridePendingTransition(R.anim.push_left_in, R.anim.hold);
//    }
//
//    public static void startActivityAnimFromLeft(Fragment fragment, Intent intent) {
//        fragment.startActivity(intent);
//        if (fragment.getActivity() != null) {
//            fragment.getActivity().overridePendingTransition(R.anim.push_left_in, R.anim.hold);
//        }
//    }
//
//    public static void startActivityAnimZoomIn(Activity activity, Intent intent) {
//        activity.startActivity(intent);
//        activity.overridePendingTransition(R.anim.zoom_in, R.anim.hold);
//    }
//
//    public static void startActivityForResult(Activity activity, Intent intent, int requestCode) {
//        activity.startActivityForResult(intent, requestCode);
//    }
//
//    public static void startActivityForResultAnimFromLeft(Activity activity, Intent intent, int requestCode) {
//        activity.startActivityForResult(intent, requestCode);
//        activity.overridePendingTransition(R.anim.push_left_in, R.anim.hold);
//    }
//
//    public static void startActivityForResultAnimFromLeft(Fragment fragment, Intent intent, int requestCode) {
//        fragment.startActivityForResult(intent, requestCode);
//        fragment.getActivity().overridePendingTransition(R.anim.push_left_in, R.anim.hold);
//    }
//
//    public static void startActivityForResultAnimZoomIn(Activity activity, Intent intent, int requestCode) {
//        activity.startActivityForResult(intent, requestCode);
//        activity.overridePendingTransition(R.anim.zoom_in, R.anim.hold);
//    }
//
//    public static void startWebViewActivity(Activity activity, Intent intent) {
//        activity.startActivity(intent);
//        activity.overridePendingTransition(R.anim.push_left_in, R.anim.hold);
//    }
//
//    public static void startWebViewActivityForResult(Activity activity, Intent intent, int requestCode) {
//        activity.startActivityForResult(intent, requestCode);
//        activity.overridePendingTransition(R.anim.push_left_in, R.anim.hold);
//    }
}
